load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
load("//prow:def.bzl", "prow_image")

NAME = "autobumper"

go_library(
    name = "go_default_library",
    srcs = ["main.go"],
    importpath = "k8s.io/test-infra/experiment/autobumper",
    visibility = ["//visibility:private"],
    deps = [
        "//experiment/autobumper/bumper:go_default_library",
        "@com_github_sirupsen_logrus//:go_default_library",
    ],
)

go_binary(
    name = "autobumper",
    embed = [":go_default_library"],
    visibility = ["//visibility:public"],
)

filegroup(
    name = "package-srcs",
    srcs = glob(["**"]),
    tags = ["automanaged"],
    visibility = ["//visibility:private"],
)

filegroup(
    name = "all-srcs",
    srcs = [
        ":package-srcs",
        "//experiment/autobumper/bumper:all-srcs",
    ],
    tags = ["automanaged"],
    visibility = ["//visibility:public"],
)

prow_image(
    name = "image",
    base = "@git-base//image",
    component = NAME,
    directory = "/",
    files = [":autobumper"],
    visibility = ["//visibility:public"],
)
